#! /bin/bash

if [ $# -ne 1 ]
then
    echo "usage: $0 boot_img_name"
    exit
fi

boot_img=$1

set -x
mkbootfs ./ramdisk | gzip > ramdisk-new.gz

mkbootimg --kernel $boot_img-kernel --ramdisk ramdisk-new.gz -o $boot_img-new.img

echo -e "generate as $boot_img-new.img\n"

set -
exit 0
